package site.jlopen.domain.node.event;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import site.jlopen.domain.node.KusciaNode;
/**
* @ClassName: KusciaNode
* @Description: kuscia_node表：kuscia_node行为执行类
* @author 码农小鹿
* @date 2024-07-08
 */
public class KusciaNodeEvent extends KusciaNode{
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
	private Date nodeCreate;
	
	private String modeStr;
	
	private String groupStr;
	
	public KusciaNodeEvent() {
		super();
	}

	public String getModeStr() {
		if(null != this.getNodeMode()) {
			switch (this.getNodeMode()) {
			case 0: {
				modeStr = "mpc";
				break;
			}
			case 1: {
				modeStr = "tee";
				break;
			}
			case 2: {
				modeStr = "mpc&tee";
				break;
			}
			default:
				modeStr = "UNKNOW";
			}
		}
		return modeStr;
	}

	public String getGroupStr() {
		if(null != this.getNodeGroup()) {
			switch (this.getNodeGroup()) {
			case 0: {
				groupStr = "中心化";
				break;
			}
			case 1: {
				groupStr = "p2p";
				break;
			}
			default:
				groupStr = "UNKNOW";
			}
		}
		return groupStr;
	}
	
}